import Vue from 'vue';
import Router from 'vue-router';

const LoginCom = () =>
    import('@/pages/user/login');
const IndexCom = () =>
    import('@/pages/user/login');

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: {name: 'index'},
        },
        {
            path: '/index',
            name: 'index',
            meta: { showFooter: true, keepAlive: true }, // 显示footer
            component: IndexCom,
        },
        {
            path: '/login',
            name: 'login',
            component: LoginCom,
        },
        {path: '*', redirect: '/'},
    ],
});
